﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using LBSoft.Common.DotNetCode;

namespace LBSoft.DataBase
{
    public interface IDbNewHelper
    {
        int ExecuteNonQuery(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters);

        object ExecuteScalar(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters);

        SqlDataReader ExecuteReader(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters);

        DataSet ExecuteDataSet(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters);

        bool MsSqlBulkCopyData(DataTable dt);

        string[] getProcedureParams(string procedurename);

        object GetParamValue(object value);

        SqlParameter GetParam(string paramName, object value);

        SqlParameter GetParam(string paramName, SqlDbType type, object value);

        DataTable GetPageList(string sql, SqlParam[] param, string orderField, string orderType, int pageIndex, int pageSize, ref int count);

        DataTable GetPageList(string sql, SqlParam[] param, string order, int pageIndex, int pageSize, ref int count);
    }
}
